
import { Position, Range, Diagnostic, TextEdit, FormattingOptions } from 'vscode-languageserver-types';


/**
 * Settings for configuring the behaviour of the formatter.
 */
export interface FormatterSettings extends FormattingOptions {

    /**
     * Flag to indicate that instructions that span multiple lines
     * should be ignored.
     */
    ignoreMultilineInstructions?: boolean;
}

/**
 * The severity options that may be defined for the validator.
 */
export enum ValidationSeverity {

    /**
     * The value to set to ignore a problem that has been detected of
     * a certain type.
     */
    IGNORE,

    /**
     * The value to set to classify a problem that has been detected
     * of a certain type as a warning.
     */
    WARNING,

    /**
     * The value to set to classify a problem that has been detected
     * of a certain type as an error.
     */
    ERROR
}

/**
 * Settings for configuring if the validator should consider a
 * problem an error, a warning, or if the problem should be ignored
 * and not be reported.
 */
export interface ValidatorSettings {

    /**
     * The setting for flagging any deprecated MAINTAINER
     * instructions that are found in the Dockerfile.
     */
    deprecatedMaintainer?: ValidationSeverity;

    /**
     * The setting for flagging directives that are not all written
     * in lowercase.
     */
    directiveCasing?: ValidationSeverity;

    /**
     * The setting for flagging instructions that span multiple lines
     * and contain empty lines (or lines that only contain whitespace
     * characters).
     */
    emptyContinuationLine?: ValidationSeverity;

    /**
     * The setting for flagging instructions that are not all written
     * in uppercase.
     */
    instructionCasing?: ValidationSeverity;

    instructionCmdMultiple?: ValidationSeverity;

    instructionEntrypointMultiple?: ValidationSeverity;

    instructionHealthcheckMultiple?: ValidationSeverity;

    instructionJSONInSingleQuotes?: ValidationSeverity;

    /**
     * The setting for flagging WORKDIR instructions that do not use
     * an absolute path.
     */
    instructionWorkdirRelative?: ValidationSeverity;
}